package hello

import (
	"context"

	v1 "demo/api/hello/v1"
	"demo/internal/dao"
)

func (c *ControllerV1) UserGetOne(ctx context.Context, req *v1.UserGetOneReq) (res *v1.UserGetOneRes, err error) {
	// return nil, gerror.NewCode(gcode.CodeNotImplemented)
	err = dao.User.Ctx(ctx).WherePri(req.Id).Scan(&res)
	if err != nil {
		return nil, err
	}
	return
}
